<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <title>AdminLTE 2 | Starter</title>
  <meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
  <link rel="stylesheet" href="/stylesheets/bootstrap.min.css">
  <link rel="stylesheet" href="/font-awesome/css/font-awesome.min.css">
  <link rel="stylesheet" href="/stylesheets/ionicons.min.css">
  <link rel="stylesheet" href="/stylesheets/AdminLTE.min.css">
  <link rel="stylesheet" href="/stylesheets/skins/skin-blue.min.css">
  <link rel="stylesheet"
        href="https://fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,600,700,300italic,400italic,600italic">
</head>
<body class="hold-transition skin-blue sidebar-mini">
<div class="wrapper">
  
  <%- include("./header.ejs") %>
  <%- include("./sidebar.ejs") %>
  <div class="content-wrapper">

    <section class="content-header">
      <h1>
        用户管理
       
            <a href="/user/add" class="btn btn-info btn-xs">添加用户</a>
     
      </h1>
      
      <ol class="breadcrumb">
        <li><a href="#"><i class="fa fa-dashboard"></i> Level</a></li>
        <li class="active">Here</li>
      </ol>
    </section>
    <section class="content container-fluid">
      <div class="box">
        <div class="box-header">
          <h3 class="box-title">用户信息</h3>
          <div class="box-tools">
            <form action="/user/search" method="get">
            <div class="input-group input-group-sm" style="width: 150px;">
                  <input type="text" name="search" id="search" class="form-control pull-right" placeholder="我要查询">
                  <div class="input-group-btn">
                    <button type="submit" class="btn btn-default"><i class="fa fa-search"></i></button>
                  </div>
            </div>
          </form>
          </div>
        </div>
 
        <div class="box-body table-responsive no-padding">
          <table class="table table-hover">
            <tbody>
              <tr>
                <th>宇宙唯一id</th>
                <th>用户名</th>
                <th>密码</th>
                 
              </tr>
              <% for(var i=0;i<data.length;i++){ %>
                <tr>
                    <td><%= data[i]._id%></td>
                    <td><%= data[i].username%></td>
                    <td><%= data[i].password%></td>

                    
                    <td> 
                        <a  href="/user/update?_id=<%=data[i]._id%>" class="btn btn-warning btn-sm" style="width:50px">修改</a>
                        <a href="/user/delete?_id=<%=data[i]._id%>" class="btn btn-danger btn-sm" style="width:50px">删除</a>
                    </td>
                  </tr>
              <% } %>

            
              
            </tbody>
          </table>
        </div>
      </div>
    </section>
  </div>
  <%- include("./footer.ejs") %>
 
  <div class="control-sidebar-bg"></div>
</div>
<script src="/javascripts/jquery.min.js"></script>
<script src="/javascripts/bootstrap.min.js"></script>
<script src="/javascripts/adminlte.min.js"></script>
</body>
</html>